TCountedRenderable Class Reference
[Data Structures]

Inheritance diagram for TCountedRenderable:

TMCSMPCountedObject I3DShRenderable IMCUnknown IMCUnknown TBitMapRenderable TInstanceRenderable TRenderableHelper TSimpleShapeRenderable TPointMeshRenderable TSegmentMeshRenderable List of all members.

Public Member Functions

 TCountedRenderable ()
 ~TCountedRenderable ()
virtual MCCOMErr MCCOMAPI QueryInterface (const MCIID &riid, void **ppvObj)
virtual uint32 MCCOMAPI AddRef ()
virtual uint32 MCCOMAPI Release ()
virtual I3DShRenderable::EType
MCCOMAPI 
GetGeometryType () const
virtual const TPointMesh
*MCCOMAPI 
GetPointMesh () const
virtual const TSegmentMesh
*MCCOMAPI 
GetSegmentMesh () const
virtual MCCOMErr MCCOMAPI GetFMesh (real lod, FacetMesh **amesh)
virtual const TMCPixelBucket
*MCCOMAPI 
GetPixelBucket (TMCRect &rect) const
virtual TRenderableFlags MCCOMAPI GetRenderableFlags (void) const
virtual MCCOMErr MCCOMAPI SetRenderableFlags (const TRenderableFlags flags)
virtual MCCOMErr MCCOMAPI GetShadingApproximation (TShadingApproximation &shadingApprox, uint32 uvSpaceID) const
virtual MCCOMErr MCCOMAPI GetFlatennedTexturesAsync (uint32 uvSpaceID, UVMaps &maps, TextureAvailableProc proc, void *privData, TMCRealRect *range=nil) const
virtual void MCCOMAPI GetBoundingBox (TBBox3D &bb)
virtual uint32 MCCOMAPI GetUVSpaceCount ()
virtual MCCOMErr MCCOMAPI GetInstance (I3DShInstance **instance)

Protected Member Functions

virtual MCCOMErr MCCOMAPI SelfGetShadingApproximation (TShadingApproximation &shadingApprox, uint32 uvSpaceID) const
virtual MCCOMErr MCCOMAPI SelfGetFlatennedTexturesAsync (uint32 uvSpaceID, UVMaps &maps, TextureAvailableProc proc, void *privData, TMCRealRect *range=nil) const

Detailed Description

Class used to pass geometry/rendering data to the renderer. Note that the GetBoundingBox function must always return a valid bounding box, so that the renderer can optimize properly. The TCountedRenderable supplies one kind of geometry (I3DShRenderable::EType) to the renderer, along with flags describing how to render the geometry.
See also:
I3DShRenderable


Constructor & Destructor Documentation

TCountedRenderable::TCountedRenderable (   ) 
 

TCountedRenderable::~TCountedRenderable (   ) 
 


Member Function Documentation

virtual uint32 MCCOMAPI TCountedRenderable::AddRef (   )  [inline, virtual]
 

Increments the reference count of the object

Reimplemented from TMCSMPCountedObject.

virtual void MCCOMAPI TCountedRenderable::GetBoundingBox (  TBBox3D &  bb  )  [virtual]
 

Returns the bounding box of the renderable in local coordinates (for triangle meshes).

Parameters:
bb The bounding box that is returned.

Implements I3DShRenderable.

Reimplemented in TRenderableHelper, TSimpleShapeRenderable, and TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetFlatennedTexturesAsync (  uint32  uvSpaceID,
UVMaps &  maps,
TextureAvailableProc  proc,
void *  privData,
TMCRealRect *  range = nil
)  const [virtual]
 

Calculates a set of texture maps that approximates the shading on the instance.

Parameters:
uvSpaceID The shading domain index.
maps The maps that are returned.
proc A callback function called when the texture is available.
privData Data passed by the callback.
range A rectangle in the texture coordinates. (NULL if the whole uvspace is required).

Implements I3DShRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetFMesh (  real  lod,
FacetMesh **  amesh
)  [virtual]
 

Returns a pointer to the triangle mesh contained in this renderable (see GetGeometryType()).

Parameters:
lod The lod that is requested.
amesh A pointer to the mesh that is returned.

Implements I3DShRenderable.

Reimplemented in TSimpleShapeRenderable, and TInstanceRenderable.

virtual I3DShRenderable::EType MCCOMAPI TCountedRenderable::GetGeometryType (   )  const [virtual]
 

Returns the type of geometry that should be rendered (points, segments or triangles...)

Implements I3DShRenderable.

Reimplemented in TRenderableHelper, TPointMeshRenderable, TSegmentMeshRenderable, TBitMapRenderable, TSimpleShapeRenderable, and TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetInstance (  I3DShInstance **  instance  )  [virtual]
 

Returns a pointer to the instance that corresponds to the renderable. Note that it can be NULL if the renderable has no instance

Parameters:
instance A pointer to the instance.

Implements I3DShRenderable.

Reimplemented in TInstanceRenderable.

virtual const TMCPixelBucket* MCCOMAPI TCountedRenderable::GetPixelBucket (  TMCRect &  rect  )  const [virtual]
 

Returns a pointer to the pixel bucket contained by the renderable. Returns NULL if the renderable is not a 2D image (see GetGeometryType()).

Implements I3DShRenderable.

Reimplemented in TBitMapRenderable.

virtual const TPointMesh* MCCOMAPI TCountedRenderable::GetPointMesh (   )  const [virtual]
 

Returns a pointer to the point mesh contained in this renderable. Returns NULL if the renderable is not a point mesh (see GetGeometryType()).

Implements I3DShRenderable.

Reimplemented in TPointMeshRenderable, and TSimpleShapeRenderable.

virtual TRenderableFlags MCCOMAPI TCountedRenderable::GetRenderableFlags (  void   )  const [virtual]
 

Returns the flags associated with this renderable. See TRenderableFlags for more info.

Implements I3DShRenderable.

Reimplemented in TRenderableHelper, TSimpleShapeRenderable, and TInstanceRenderable.

virtual const TSegmentMesh* MCCOMAPI TCountedRenderable::GetSegmentMesh (   )  const [virtual]
 

Returns a pointer to the segment mesh contained in this renderable. Returns NULL if the renderable is not a segment mesh (see GetGeometryType()).

Implements I3DShRenderable.

Reimplemented in TSegmentMeshRenderable, and TSimpleShapeRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetShadingApproximation (  TShadingApproximation &  shadingApprox,
uint32  uvSpaceID
)  const [virtual]
 

Returns an approximation of the shading that can be used for interactive rendering.

Parameters:
shadingApprox The color of the shader.
uvSpaceID The UVSpaceID for which the approximation is required.

Implements I3DShRenderable.

virtual uint32 MCCOMAPI TCountedRenderable::GetUVSpaceCount (   )  [virtual]
 

Returns the number of shading domaine (uv space) on the primitive.

Implements I3DShRenderable.

Reimplemented in TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::QueryInterface (  const MCIID &  riid,
void **  ppvObj
)  [virtual]
 

Check if the object supports a given interface and returns a pointer to that interface if it does. Note that QueryInterface will increment the reference count of the object by one if the interface is found.

Parameters:
riid GUID of the interface
ppvObj A pointer to the pointer being returned.

Reimplemented from TMCSMPCountedObject.

virtual uint32 MCCOMAPI TCountedRenderable::Release (   )  [inline, virtual]
 

Decrements the reference count of the object. If the reference count reaches zero, the object is destroyed.

Reimplemented from TMCSMPCountedObject.

virtual MCCOMErr MCCOMAPI TCountedRenderable::SelfGetFlatennedTexturesAsync (  uint32  uvSpaceID,
UVMaps &  maps,
TextureAvailableProc  proc,
void *  privData,
TMCRealRect *  range = nil
)  const [protected, virtual]
 

Reimplemented in TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::SelfGetShadingApproximation (  TShadingApproximation &  shadingApprox,
uint32  uvSpaceID
)  const [protected, virtual]
 

Reimplemented in TRenderableHelper, TSimpleShapeRenderable, and TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::SetRenderableFlags (  const TRenderableFlags  flags  )  [virtual]
 

Sets the flags associated with this renderable.

Parameters:
flags The flags.

Implements I3DShRenderable.

Reimplemented in TSimpleShapeRenderable, and TInstanceRenderable.


The documentation for this class was generated from the following file:
Generated on Wed Dec 7 14:27:45 2005 for Carrara SDK Doc by  doxygen 1.4.5